/* Speaking & Conversation Tool - Kid Centric Design for Bengali */

@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Gujarati:wght@400;500;600;700;800;900&family=Poppins:wght@400;500;600;700;800&display=swap");

:root {
    --speaking-primary-bg: #f5f4ed;
    --speaking-secondary-bg: #ffc62f;
    --speaking-dark: #1e1e1e;
    --speaking-border-width: 4px;
}

/* Main Overlay */
.three-speaking-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffebc4 0%, #ffebc4ad 100%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--fs-12-20);
    backdrop-filter: blur(10px);
    animation: twoFadeIn 0.4s ease-out;
}

@keyframes twoFadeIn {
    from {
        opacity: 0;
        transform: translateY(var(--fs-12-20));
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Container */
.three-speaking-container {
    background: var(--speaking-primary-bg);
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    border-radius: var(--fs-16-32);
    box-shadow: 0 var(--fs-12-20) var(--fs-26-60) rgba(30, 30, 30, 0.3);
    overflow-y: auto;
    border: var(--speaking-border-width) solid var(--speaking-secondary-bg);
    animation: twoSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes twoSlideUp {
    from {
        transform: translateY(var(--fs-26-60)) scale(0.9);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Header */
.three-header {
    background: linear-gradient(45deg, #dfab46 40%, #dfb86d 40%, #dfab46 61%);
    padding: var(--fs-12-18) var(--fs-12-20);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.three-header h1 {
    font-size: var(--fs-16-32);
}

/* Stats */
.three-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--fs-12-20);
    padding: var(--fs-16-32);
}

.three-stat-card {
    background: var(--speaking-secondary-bg);
    padding: var(--fs-12-20);
    border-radius: var(--fs-12-20);
    text-align: center;
    border: 3px solid var(--speaking-dark);
}

.stat-score {
    font-size: var(--fs-20-42);
    font-weight: 900;
}

.stat-label {
    font-size: var(--fs-10-16);
    text-transform: uppercase;
    font-weight: 700;
}

/* Menu Cards */
.three-activity-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: var(--fs-12-20);
    padding: var(--fs-16-32);
}

.three-activity-card {
    background: var(--speaking-secondary-bg);
    border-radius: var(--fs-12-20);
    padding: var(--fs-16-32);
    text-align: center;
    cursor: pointer;
    border: 4px solid var(--speaking-dark);
    flex: 1;
    transition: 0.3s;
}

.three-activity-card:hover {
    transform: translateY(-5px);
}

.three-activity-card h2 {
    font-size: var(--fs-16-32);
    margin-bottom: var(--fs-12-16);
}

/* Game Elements */
.game-content {
    padding: var(--fs-16-32);
    animation: twoFadeIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.section-title {
    color: var(--speaking-dark);
    font-size: var(--fs-16-32);
    border: 6px solid var(--speaking-secondary-bg);
    padding: var(--fs-12-20);
    margin-bottom: var(--fs-16-32);
    text-align: center;
    font-weight: 900;
    background: #fff;
    border-radius: var(--fs-12-20);
}

.part-title {
    color: var(--speaking-dark);
    font-size: var(--fs-16-32);
    border: 6px solid var(--speaking-secondary-bg);
    padding: var(--fs-12-20);
    margin-bottom: var(--fs-16-32);
    text-align: center;
    font-weight: 900;
    background: #fff;
    border-radius: var(--fs-12-20);
}

.sub-category-box {
    margin-bottom: var(--fs-12-20);
    background: rgba(255, 255, 255, 0.5);
    padding: var(--fs-12-18);
    border-radius: var(--fs-12-18);
}

.category-subtitle {
    font-size: var(--fs-16-32);
    color: #e67e22;
    margin-bottom: var(--fs-12-18);
    border-left: 8px solid #e67e22;
    padding-left: var(--fs-12-18);
    font-weight: 800;
    word-break: break-all;
}

/* Greetings Grid */
.greetings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
    gap: var(--fs-12-18);
    margin-bottom: var(--fs-10-16);
    width: 100%;
}

.greeting-item {
    background: #fdfcf7;
    border: 3px solid var(--speaking-secondary-bg);
    border-radius: var(--fs-12-16);
    cursor: pointer;
    font-weight: 800;
    padding: var(--fs-12-20);
    font-size: var(--fs-12-20);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: 0.2s;
}

.greeting-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 var(--fs-10-16) var(--fs-12-20) rgba(0, 0, 0, 0.15);
}

/* Mark as Completed Button */
.mark-completed-div {
    background: #27ae60;
    color: white;
    padding: var(--fs-12-18) var(--fs-16-32);
    border-radius: var(--fs-12-18);
    text-align: center;
    font-weight: 800;
    cursor: pointer;
    margin: var(--fs-12-20) auto;
    max-width: 400px;
    border: 3px solid var(--speaking-dark);
    transition: 0.2s;
    font-size: var(--fs-12-18);
}

.mark-completed-div:hover {
    background: #2ecc71;
    transform: scale(1.05);
}

/* Sentence Builder Mechanics */
.word-drop-zone {
    background: white;
    min-height: 80px;
    border: 3px dashed var(--speaking-secondary-bg);
    border-radius: var(--fs-12-20);
    padding: var(--fs-12-20);
    display: flex;
    justify-content: center;
    gap: var(--fs-10-16);
    flex-wrap: wrap;
    margin: var(--fs-12-20) 0;
}

.word-bank {
    display: flex;
    justify-content: center;
    gap: var(--fs-10-16);
    flex-wrap: wrap;
    margin-bottom: var(--fs-16-32);
}

.word-tile {
    background: var(--speaking-secondary-bg);
    padding: var(--fs-10-16) var(--fs-12-20);
    border-radius: var(--fs-10-16);
    font-weight: bold;
    border: 2px solid var(--speaking-dark);
    cursor: pointer;
    box-shadow: 0 4px 0 #000;
    font-size: var(--fs-12-16);
}

.audio-prompt-box {
    background: #fff8e1;
    border: 3px solid var(--speaking-secondary-bg);
    padding: var(--fs-12-20);
    border-radius: var(--fs-12-18);
    cursor: pointer;
    text-align: center;
    margin-bottom: var(--fs-12-20);
    font-weight: 800;
    font-size: var(--fs-12-20);
}

.prompt-box {
    background: #f5edd6;
    border: 3px dashed var(--speaking-secondary-bg);
    padding: var(--fs-12-20);
    border-radius: var(--fs-12-18);
    cursor: pointer;
    text-align: center;
    margin-bottom: var(--fs-12-20);
    font-weight: 800;
    font-size: var(--fs-14-20);
}

/* Action Buttons */
.game-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--fs-12-18);
}

.three-action-btn {
    padding: var(--fs-12-16) var(--fs-12-24);
    border-radius: var(--fs-12-16);
    font-weight: bold;
    cursor: pointer;
    border: none;
    color: white;
    background: var(--speaking-dark);
    font-size: var(--fs-12-16);
}

.check-btn {
    background: #27ae60 !important;
}

.reset-btn {
    background: #e67e22 !important;
}

.undo-btn {
    background: #7f8c8d !important;
}

/* Self Intro */
.self-intro-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--fs-12-18);
}

.intro-item {
    justify-content: space-between !important;
    text-align: left;
    background: white !important;
}

.intro-text {
    display: flex;
    flex-direction: column;
}

.intro-label {
    color: #e67e22;
    font-size: var(--fs-12-16);
}

/* Close Button */
.three-close-x {
    background: var(--speaking-primary-bg);
    color: var(--speaking-secondary-bg);
    border: none;
    width: var(--fs-26-60);
    height: var(--fs-26-60);
    border-radius: 50%;
    font-size: var(--fs-12-20);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 8px;
    right: var(--fs-10-16);
    border: 3px solid var(--speaking-secondary-bg);
    font-weight: 800;
}

.three-close-x:hover {
    background: var(--speaking-secondary-bg);
    color: var(--speaking-primary-bg);
    border: 3px solid var(--speaking-primary-bg);
    transform: rotate(90deg) scale(1.1);
}

.feedback-text {
    text-align: center;
    margin-top: var(--fs-12-20);
    font-weight: bold;
    font-size: var(--fs-12-24);
}

.section-divider {
    border: 0;
    height: 3px;
    background: var(--speaking-secondary-bg);
    margin: var(--fs-16-32) 0;
    opacity: 0.5;
}

/* Question Words */
.question-words-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: var(--fs-12-20);
    padding: var(--fs-10-16);
}

.q-word-card {
    background: white;
    border: 4px solid var(--speaking-secondary-bg);
    border-radius: var(--fs-12-20);
    overflow: hidden;
    transition: 0.3s;
}

.q-word-card:hover {
    transform: translateY(-3px);
}

.q-word-header {
    background: var(--speaking-secondary-bg);
    padding: var(--fs-12-18);
    font-weight: 900;
    text-align: center;
    cursor: pointer;
    font-size: var(--fs-16-32);
    color: var(--speaking-dark);
}

.q-word-body {
    padding: var(--fs-12-20);
}

.q-usage {
    font-size: var(--fs-12-18);
    margin-bottom: var(--fs-12-18);
    color: #555;
}

.q-example-box {
    background: #fdfcf7;
    border: 2px dashed #e67e22;
    padding: var(--fs-12-18);
    border-radius: var(--fs-12-16);
    cursor: pointer;
    color: #e67e22;
    font-weight: 700;
    text-align: center;
    font-size: var(--fs-12-20);
}

.q-example-box:hover {
    background: #fff5e6;
}

/* Exercise Section */
.exercise-card {
    background: white;
    border: 4px solid #3498db;
    border-radius: var(--fs-12-20);
    padding: var(--fs-16-32);
    max-width: 600px;
    margin: var(--fs-12-20) auto;
    text-align: center;
}

.exercise-question {
    font-size: var(--fs-16-32);
    font-weight: 800;
    margin-bottom: var(--fs-12-20);
    color: var(--speaking-dark);
}

.exercise-options {
    display: flex;
    justify-content: center;
    gap: var(--fs-12-18);
    flex-wrap: wrap;
}

.opt-btn {
    background: #3498db;
    color: white;
    border: 3px solid #2980b9;
    padding: var(--fs-12-16) var(--fs-12-20);
    font-size: var(--fs-12-20);
    font-weight: 700;
    border-radius: var(--fs-12-18);
    cursor: pointer;
    transition: 0.2s;
}

.opt-btn:hover {
    background: #2980b9;
    transform: scale(1.05);
}

/* Image Practice */
.phrase-img-box {
    max-width: 250px;
    height: 250px;
    margin: 0 auto var(--fs-12-20);
    border-radius: var(--fs-12-20);
    border: 5px solid var(--speaking-secondary-bg);
    overflow: hidden;
    background: #eee;
}

.phrase-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Self Intro Learning */
.self-intro-learn-box {
    background: #ffffff;
    border: 4px solid #e67e22;
    border-radius: var(--fs-12-20);
    padding: var(--fs-12-20);
    margin-bottom: var(--fs-16-32);
}

.self-intro-learn-title {
    font-size: var(--fs-16-32);
    font-weight: 900;
    text-align: center;
    margin-bottom: var(--fs-12-20);
    color: #e67e22;
}

.intro-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: var(--fs-12-18);
}

.intro-step {
    background: #fff5e6;
    border-left: 8px solid #e67e22;
    padding: var(--fs-12-18) var(--fs-12-20);
    border-radius: var(--fs-12-16);
    font-size: var(--fs-12-18);
    font-weight: 700;
    word-break: break-all;
}

.yes-btn {
    background: #27ae60 !important;
    border-color: #1e8449 !important;
}

.no-btn {
    background: #e74c3c !important;
    border-color: #c0392b !important;
}

/* Help Section */
.three-help-content {
    padding: var(--fs-26-60);
    max-width: 900px;
    margin: 0 auto;
}

.three-help-issue {
    background: white;
    border: 3px solid var(--speaking-dark);
    border-radius: var(--fs-12-20);
    padding: var(--fs-16-32);
    margin-bottom: var(--fs-12-20);
    display: flex;
    gap: var(--fs-12-20);
    align-items: flex-start;
    transition: all 0.3s ease;
}

.three-help-issue:hover {
    transform: translateY(-5px);
    box-shadow: 0 var(--fs-10-16) var(--fs-12-20) rgba(0, 0, 0, 0.15);
}

.three-help-number {
    flex-shrink: 0;
    width: var(--fs-26-60);
    height: var(--fs-26-60);
    background: linear-gradient(135deg, var(--speaking-secondary-bg) 0%, #dfab46 100%);
    color: var(--speaking-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-16-32);
    font-weight: 800;
    border: 3px solid var(--speaking-dark);
}

.three-help-text {
    flex: 1;
}

.three-help-text h4 {
    font-size: var(--fs-16-32);
    color: var(--speaking-dark);
    margin: 0 0 var(--fs-10-16) 0;
    font-weight: 800;
    line-height: 1.3;
}

.three-help-text p {
    font-size: var(--fs-12-18);
    color: #2d3436;
    line-height: 1.6;
    margin: 0;
    font-weight: 600;
}

.three-help-text p span {
    display: block;
    margin-top: 8px;
    font-size: 0.9em;
    opacity: 0.85;
    font-family: 'Poppins', sans-serif;
}

.three-back-btn {
    background: var(--speaking-dark);
    color: white;
    border: none;
    padding: var(--fs-12-18) var(--fs-26-60);
    border-radius: var(--fs-12-20);
    font-size: var(--fs-12-18);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin: var(--fs-12-20) auto 0;
    display: block;
    width: fit-content;
}

.three-back-btn:hover {
    background: #2d2d2d;
    transform: translateY(-3px);
    box-shadow: 0 8px var(--fs-12-20) rgba(0, 0, 0, 0.2);
}

/* Toast Notifications */
.four-conversation-toast {
   position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(
    135deg,
    var(--four-conversation-secondary-bg) 0%,
    #1a535c 100%
  );
  color: white;
  padding: clamp(15px, 3vw, 20px) clamp(25px, 5vw, 35px);
  border-radius: clamp(12px, 2.5vw, 20px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  z-index: 99999;
  min-width: clamp(250px, 40vw, 400px);
  max-width: 90vw;
  border: 3px solid white;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  opacity: 0;
}

.four-conversation-toast-show {
    opacity: 1;
    transform: translateX(0);
}

.four-conversation-toast-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.four-conversation-toast-error {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
}

.four-conversation-toast-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.four-conversation-toast-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.four-conversation-toast-content {
    display: flex;
    align-items: center;
    gap: var(--fs-12-16);
}

.four-conversation-toast-icon {
    font-size: var(--fs-12-24);
    flex-shrink: 0;
}

.four-conversation-toast-message {
    flex: 1;
    font-size: var(--fs-12-16);
    line-height: 1.5;
    white-space: pre-line;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: var(--fs-10-16);
    height: var(--fs-10-16);
}

::-webkit-scrollbar-track {
    background: #fff7d1;
    border-radius: var(--fs-10-16);
}

::-webkit-scrollbar-thumb {
    background: #ffc62f;
    border-radius: var(--fs-10-16);
    border: 2px solid #fff7d1;
}

::-webkit-scrollbar-thumb:hover {
    background: #ffb300;
}

/* Responsive */
@media (max-width: 768px) {
    .three-help-content {
        padding: var(--fs-12-20);
    }

    .three-help-issue {
        flex-direction: row;
        gap: var(--fs-12-18);
    }
}

@media (max-width: 480px) {
    .three-help-issue {
        flex-direction: column;
        text-align: center;
        gap: var(--fs-12-18);
    }

    .three-help-number {
        align-self: center;
    }

    .three-back-btn {
        width: 100%;
    }

    .four-conversation-toast {
        right: var(--fs-10-16);
        left: var(--fs-10-16);
        min-width: auto;
    }
}